package top.kaoshanji.p1ch02b;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/5/21 15:10
 */
@Configuration
public class MainConfig {

    // 代码清单-p1ch02b-43页b：将外部属性值绑定到@Bean方法上
    @Bean
    @ConfigurationProperties(prefix = "member")
    public OtherMember otherMember() {
        return new OtherMember();
    }

}
